package com.qingke.OMS.Command.Imp;



import com.qingke.OMS.Command.Command;
import com.qingke.OMS.Dao.GoodsDao;
import com.qingke.OMS.Pojo.Goods;
import com.qingke.OMS.Unit.Console;

public class setGoodsprice implements Command{

	@Override
	public void execute() {
		 GoodsDao gdao=new GoodsDao();
         int pid=Console.askUserInputInt("Please enter goods' pid");
         double price=(double)Console.askUserInputInt("Please enter goods' price");
         Goods goods = new Goods();
 		goods.setPid(pid);
 		goods.setPrice(price);
 		gdao.updateGoods(price, pid);
 		
 	
		
// 		if(gs==null){
//	    	Console.println("invalid category_id!");
//	        return ;
//	    }
// 		for (Goods good2 : gs) {
// 			System.out.println(good2);
// 		}
// 			

 		 
	}

}
